<?php if (!defined('THINK_PATH')) exit();?>
 <html>
   <head>
		<meta  charset="utf-8">
		<style>
		a{
		  text-decoration:none;
		}
		
		  .current{
		  
		  background-color:#ddd;
		   color:red;
		  }
		.prev,.num,.next,.current{
		 width:auto;
		 height:auto;
		 margin:4px;
		 border:1px solid #ddd;
		 padding:1px 2px;
		
		 box-shadow:0 0 2px rgba(0,0,0,0.2);
		 background-color:rgba(255,255,255,0.1);
		 }

		</style>
   </head>

   <body>
 
		<center>
			 <h3>还款管理系统</h3>
			 <a href="<?php echo U('Debt/select');?>">查看信息</a>
		     <a href="<?php echo U('Debt/add');?>">添加信息</a>
		     <hr>  
			
			 <form action="<?php echo U('Debt/select');?>"   method="get">
			   <b> App名称:</b><input type="text" name="name"  value="<?php echo ((isset($name ) && ($name !== ""))?($name ):''); ?>">
			   <b> 还款日期:</b><select name="repayment_date">
			   <option></option><option>00</option>
			   <?php $__FOR_START_28679__=1;$__FOR_END_28679__=32;for($i=$__FOR_START_28679__;$i < $__FOR_END_28679__;$i+=1){ ?><option value="<?php echo ($i); ?>"   <?php echo ($i == $repayment_date ? selected:''); ?>><?php echo ($i); ?></option><?php } ?>
			     
			     </select>
			   <input type="submit" value="搜索">
			 </form>
		  
			<table  width="700"  border="1" cellspacing="0"  >
			   <tr>
					<th>id</th>
					<th>App名称</th>
					<th>还款日期</th>
					<th>金额</th>
					<th>操作</th>
			   </tr>
			    <?php if(is_array($list)): foreach($list as $key=>$vo): ?><tr>
						<td><?php echo ($vo["id"]); ?></td>
						<td><?php echo ($vo["name"]); ?></td>
						<td><?php echo ($vo["repayment_date"]); ?>日</td>
						<td>￥<?php echo ($vo["money"]); ?></td>
						<td><a href="<?php echo U('Debt/edit');?>?id=<?php echo ($vo['id']); ?>">修改</a> | <a href="<?php echo U('Debt/del');?>?id=<?php echo ($vo['id']); ?>&pic=<?php echo ($vo['pic']); ?>">删除</a></td>
					</tr><?php endforeach; endif; ?>
			</table>
			<br>
			<div><?php echo ($pageinfo); ?></div>
		</center>
   </body>
 </html>